<html>
<head><meta charset="utf-8"><title>schema cleanup · t-compiler/performance · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/index.html">t-compiler/performance</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/schema.20cleanup.html">schema cleanup</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="245511912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/schema%20cleanup/near/245511912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/schema.20cleanup.html#245511912">(Jul 09 2021 at 22:16)</a>:</h4>
<p>Was thinking a bit about the layout of the database (at least for benchmark runs). There's a few small pieces that make it a bit strange to query for some stuff. I took a stab at doing some slight tweaks to the schema to hopefully make things a bit clearer. <a href="https://asciiflow.com/#/share/eJzNVktqwzAQvYrQsmTTrpqcxWAURSGishwkpcSEQDFddtGFSbvosqcoPo1PUrnyR4kVsJQ2VAzE8vN788bxDNpBjhICZ3zD2AQylBEBZ3AXwW0EZ9Pp7SSCmb66u5%2FqK0W2Sm8iCMyqipeqePKJ1ygSV%2BbxzmwO5oTjVYLEg2zuNLI5wCljBCuacnmCIKHoEmElQcfpJT88%2FXw2slfk2fUfL7tKL4RXRXkah6%2F6YboAN26ZAVK9PWueG9MsA5swGUPLaLO4WcChX7eEWx%2BnSUKVW9%2FNcun%2FtX%2Bx4TJOeSwVmjMyTr8EC6T%2Bif8wfZWtR%2FkvPHvovckewjPewjJazs1%2B5OpKtdfvKwKXXuhkDyH6uMrBWjeDiiURlMijr6OBZM%2FOfZRLT9tl90%2F4jnIvV65HxBnIr97BtK6Vq0PZjpHhoL%2Fcd6sd4NwZ%2FUEg1natLA1sPpMfbFSefuP2H%2FbeLdW1SJeUERtuVdvziXF7ruKAuKiuYzJGeEXc5P7gVRfgIntkPmHWfU2lotjWqn8eEduQAc%2Fuab%2FoaJ6jAO7h%2FhuTYt6r">Here's a diagram</a><br>
In general it just gives every table an id and does joins through ids instead of multi-column joins. I'm not sure if this will be any more performant, but it definitely feels a bit more "normal" - at least coming from a web backend background.</p>



<a name="245511997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/schema%20cleanup/near/245511997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/schema.20cleanup.html#245511997">(Jul 09 2021 at 22:16)</a>:</h4>
<p>If you're curious what the schema is like now, I did a bit of a write up on it <a href="https://github.com/rust-lang/rustc-perf/pull/899">here</a></p>



<a name="245512428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/schema%20cleanup/near/245512428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/schema.20cleanup.html#245512428">(Jul 09 2021 at 22:19)</a>:</h4>
<p>hm, I am trying to see how that diagram is different from what we do today</p>



<a name="245512615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/schema%20cleanup/near/245512615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/schema.20cleanup.html#245512615">(Jul 09 2021 at 22:21)</a>:</h4>
<p>ah, I see, every table an ID</p>



<a name="245512690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/schema%20cleanup/near/245512690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/schema.20cleanup.html#245512690">(Jul 09 2021 at 22:22)</a>:</h4>
<p>I think that we already have that -- we just drop the id from tables where it seems "unnecessary" (i.e., we never reference that table)</p>



<a name="245512838"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/schema%20cleanup/near/245512838" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/schema.20cleanup.html#245512838">(Jul 09 2021 at 22:24)</a>:</h4>
<p>Yea there's not too much of a difference. The biggest one is having the benchmark name be the primary key. I'm not sure how well the databases handle text as primary keys</p>



<a name="245512871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/schema%20cleanup/near/245512871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/schema.20cleanup.html#245512871">(Jul 09 2021 at 22:24)</a>:</h4>
<p>I have to admit, my first version was a bit different, but I tried to scale it back to not have to do huge migrations.</p>



<a name="245512930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/schema%20cleanup/near/245512930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/schema.20cleanup.html#245512930">(Jul 09 2021 at 22:25)</a>:</h4>
<p>I suppose we can leave it as it is since it's probably not worth the migrations for the small quality of life changes. I can add a diagram to the schema documentation PR</p>



<a name="245513008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/schema%20cleanup/near/245513008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/schema.20cleanup.html#245513008">(Jul 09 2021 at 22:26)</a>:</h4>
<p>hm, yeah, probably not worth the migration hassle. thanks!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>